﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IHISCETeim.DAL;
using IHISCETeim.Model;
using IHISCETeim.Library;
using System.Data;

namespace IHISCETeim.BLL
{
    public class VIPCustomerController
    {
        /// <summary>
        /// 返回-1表示客户相应的身份证已存在，不能重复添加
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public static int Add(VIPCustomerInfo obj)
        {
            return VIPCustomerDAL.Add(obj);
        }
        public static bool Delete(int CustomerId)
        {
            return VIPCustomerDAL.Delete(CustomerId);
        }
        public static VIPCustomerInfo GetList(int CustomerId)
        {
            return  CBO.FillObject<VIPCustomerInfo>( VIPCustomerDAL.GetList(CustomerId));
        }
        public static DataTable GetPagination(string WhereSql, int PageIndex, int PageSize, string Sort, ref int TotalCount)
        {
            return VIPCustomerDAL.GetPagination(WhereSql, PageIndex, PageSize, Sort, ref  TotalCount);
        }
        /// <summary>
        /// 返回-1表示客户相应的身份证已存在，不能重复添加
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public static int Update(VIPCustomerInfo obj)
        {
            return VIPCustomerDAL.Update(obj);
        }
    }
}
